﻿@model PagedList<Post>
@{
    var hasDisqusCode = !string.IsNullOrWhiteSpace(Model.Blog.Property().Disqus as string);
}
@foreach (var post in Model.List) {
    var url = Url.Action("show", "posts", new { slug = post.Slug });
    <article class="hentry" role="article">
        <header class="xfolkentry">
            <h1 class="entry-title">
                <a href="@url" class="taggedlink" rel="bookmark">@post.Title</a>
            </h1>
            <p class="entry-meta" role="contentinfo">
                <time class="updated published" datetime="@post.PublishedAt.ShortFormat()" pubdate="pubdate">@post.PublishedAt.LongFormat()</time>
                @if (hasDisqusCode && post.AllowComments) {
                    <span>&ndash;</span>
                    <a href="@url#disqus_thread">comments</a>
                }
            </p>
        </header>
        <div class="entry-content">
            <div>@Html.Raw(@Renderer.RenderSummary(post))</div>
            <div class="continue"><a href="@url" title="Read the full post">continue &raquo</a></div>
        </div>
    </article>
}